#ifndef FRM_USERPAGE_H
#define FRM_USERPAGE_H

#include <QWidget>
#include <QString>
#include <QTreeWidgetItem>
#include "user.h"
#include "usermodel.h"
#include "queryresultmodel.h"
#include <QListView>
#include <QVBoxLayout>
#include "frienduserpage.h"
namespace Ui {
class frm_UserPage;
}

class frm_UserPage : public QWidget
{
    Q_OBJECT
    enum Treetype{
        itTopitem = 1001,
        itGroupitem
    };

public:
    explicit frm_UserPage(QWidget *parent = nullptr);
    ~frm_UserPage();
    void initTree();
    void initStack();
    void getUserInfo(User t);
    void setUser(User t);
    void OrderRequestDone(QueryResultModel* fl);
    QTreeWidgetItem* getItem(QTreeWidgetItem*,QString);
signals:
    void changeUserData(User t);
    void RequestQueryModel();
    void RequestUserModel();
public slots:
    void itemclicked(QTreeWidgetItem* cur,int );
    void UserModelRequestDone(UserModel*);

private:
    Ui::frm_UserPage *ui;
};

#endif // FRM_USERPAGE_H
